<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../../common/taglibs.jsp"%>
<%@include file="../../common/_head.jsp"%>
<html>
<head>
    <title>用户信息</title>
</head>
<body pname="<%=basePath%>">
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <table class="layui-hide" id="data-table" lay-filter="data-table"></table>

                    <script type="text/html" id="data-table-toolbar">
                        <div class="layui">
                            <div class="layui-condition">
                                <label>搜索：</label>
                                <div class="layui-inline" style="width: 150px;">
                                    <input type="text" id="keyword" placeholder="请输入ID/昵称/手机号" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>性别：</label>
                                <div class="layui-inline" style="width: 70px;">
                                    <select id="gender">
                                        <option value="">全部</option>
                                        <option value="0">未知</option>
                                        <option value="1">男</option>
                                        <option value="2">女</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>身份：</label>
                                <div class="layui-inline" style="width: 100px;">
                                    <select id="host">
                                        <option value="">全部</option>
                                        <option value="0">普通用户</option>
                                        <option value="1">主播</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>会员：</label>
                                <div class="layui-inline" style="width: 70px;">
                                    <select id="identity">
                                        <option value="">全部</option>
                                        <option value="10">黄金</option>
                                        <option value="20">铂金</option>
                                        <option value="30">钻石</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>账号状态：</label>
                                <div class="layui-inline" style="width: 70px;">
                                    <select id="status">
                                        <option value="">全部</option>
                                        <option value="0">正常</option>
                                        <option value="1">禁用</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-condition">
                                <label>时间：</label>
                                <div class="layui-inline" style="width: 180px;">
                                    <input type="text" class="layui-input" id="time" placeholder=" - " autocomplete="off">
                                </div>
                            </div>
                            <div class="layui-condition">
                                <button type="button" class="layui-btn" id="search" lay-event="search">
                                    <i class="layui-icon">&#xe615;</i>搜索
                                </button>
                            </div>
                        </div>
                    </script>

                    <script type="text/html" id="data-table-bar">
                        <c:forEach items="${userPermissions}" var="permission">
                            <c:if test="${permission eq '/user/edit'}">
                                <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
                            </c:if>
                            <c:if test="${permission eq '/user/updateStatus'}">
                                <a class="layui-btn layui-btn-xs updateStatus" lay-event="updateStatus">
                                    {{# if(d.status == 0){ }}
                                        禁用
                                    {{# }else{ }}
                                        启用
                                    {{# } }}
                                </a>
                            </c:if>
                            <c:if test="${permission eq '/user/updAudit'}">
                                <a class="layui-btn layui-btn-xs" lay-event="updAudit">
                                    {{# if(d.audit == 0){ }}
                                        禁用认证
                                    {{# }else{ }}
                                        启用认证
                                    {{# } }}
                                </a>
                            </c:if>
                            <c:if test="${permission eq '/user/disableImei'}">
                                {{# if(d.imei != null){ }}
                                <a class="layui-btn layui-btn-xs updateStatus" lay-event="disableImei">
                                    {{# if(d.imeiReason == null){ }}
                                        禁用设备
                                    {{# }else{ }}
                                        启用设备
                                    {{# } }}
                                </a>
                                {{# } }}
                            </c:if>
                            <c:if test="${permission eq '/user/editInvite'}">
                                {{# if(d.pid == null || d.pid == 0){ }}
                                    <a class="layui-btn layui-btn-xs" lay-event="editInvite">编辑邀请者</a>
                                {{# } }}
                            </c:if>
                            <c:if test="${permission eq '/user/recharge'}">
                                <a class="layui-btn layui-btn-xs" lay-event="recharge">充值</a>
                            </c:if>
                            <c:if test="${permission eq '/user/info'}">
                                <a class="layui-btn layui-btn-xs" lay-event="info">详情</a>
                            </c:if>
                        </c:forEach>
                    </script>

                    <script type="text/html" id="iconTpl">
                        <img src="{{ ossDomain }}/{{d.icon }}" style="width: 100%;">
                    </script>

                    <script type="text/html" id="genderTpl">
                        {{# if(d.gender == 0){ }}
                            --
                        {{# }else if(d.gender == 1){ }}
                            男
                        {{# }else if(d.gender == 2){ }}
                            女
                        {{# } }}
                    </script>
                    <script type="text/html" id="hostTpl">
                        {{# if(d.host == 0){ }}
                            用户
                        {{# }else{ }}
                            主播
                        {{# } }}
                    </script>
                    <script type="text/html" id="identityTpl">
                        {{# if(d.identity == 10){ }}
                            黄金
                        {{# }else if(d.identity == 20){ }}
                            铂金
                        {{# }else if(d.identity == 30){ }}
                            钻石
                        {{# }else{ }}
                            --
                        {{# } }}
                    </script>
                    <script type="text/html" id="statusTpl">
                        {{# if(d.status == 0){ }}
                            正常
                        {{# }else{ }}
                            禁用
                        {{# } }}
                    </script>
                    <script type="text/html" id="inviteCountTpl">
                        <a href="#" lay-event="viewInvite" style="color: #F56177; text-decoration: none;">{{d.inviteCount}}</a>
                    </script>
                    <script type="text/html" id="coinTpl">
                        {{d.coin}}/{{d.totalCoin}}
                    </script>
                    <script type="text/html" id="creditTpl">
                        {{d.credit}}/{{d.totalCredit}}
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="<%=path%>/js/usermanage/user/list.js?v=1.1.16"></script>
</body>
</html>
